﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace ForrajeriaFRONT
{
    public partial class Cliente : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
             
            if (Context.User.IsInRole("CLIENTE"))
            {
                HtmlGenericControl li = new HtmlGenericControl("li");
                
                navigation.Controls.Add(li);

                HtmlGenericControl anchor = new HtmlGenericControl("a");
                anchor.Attributes.Add("href", "/PedidosCliente.aspx");
                anchor.InnerText = "Nuevo Pedido";

                li.Controls.Add(anchor);

                HtmlGenericControl li2 = new HtmlGenericControl("li");

                navigation.Controls.Add(li2);

                HtmlGenericControl anchor2 = new HtmlGenericControl("a");
                anchor2.Attributes.Add("href", "/MisPedidos.aspx");
                anchor2.InnerText = "Mis Pedidos";

                li2.Controls.Add(anchor2);
            }

        }
    }
}